Repository navigation
Lock workflow dependencies with an Actions lockfile - #53
Merged
Merged
Conversation
Every workflow is onboarded to .github/workflows/actions.lock (gh actions-lock), which locks each action, and the actions those actions use, to its commit. Workflows and the repository's composite actions name actions by their exact release tags at the commits they were already pinned to, as the lockfile docs recommend; the composite actions are called as `$/` so their actions are locked. The published action.yml keeps its SHAs for its consumers, and action-e2e keeps `uses: ./` with a never-run composite that locks that action's actions. dist's github-action-commits now hold the same tags, so release.yml stays exactly what dist generates. CI's actions-lock job verifies the lockfile. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Workflow-wide lockfile enforcement needs human CI confirmation because hosted-runner validation is unavailable and access to gh-actions-lock and its unreleased generator fixes was denied.
No open issues 🎉
What changed in this PR
Adopts a workflow dependency lockfile across Projections’ 10 workflows, moving action references to exact release tags while retaining locked commits and the published action’s SHA pins.
Changes:
- Adds
actions.lockand migrates internal composite-action calls to self-repository syntax. - Adds CI lockfile verification and a dependency-listing composite for testing the local published action.
- Updates release-generation inputs, regression tests, contributor documentation, and targeted actionlint exceptions.
| File | Description |
|---|---|
packages/integrations/github-action/test/action.test.mjs |
Checks that the dependency composite matches the published action’s pins. |
packages/cli/test/release.test.mjs |
Requires exact release tags and workflow lockfile entries. |
docs/runner/building.md |
Documents additional actionlint exceptions. |
dist-workspace.toml |
Uses exact action tags for release generation. |
CONTRIBUTING.md |
Documents lockfile maintenance and exceptions. |
.github/workflows/release.yml |
Updates generated release action references to exact tags. |
.github/workflows/release-proof.yml |
Uses exact tags for release validation actions. |
.github/workflows/release-inputs.yml |
Uses exact tags for release-input preparation. |
.github/workflows/release-approval.yml |
Uses exact tags for artifact download and attestation. |
.github/workflows/publish-schemas.yml |
Uses exact tags for schema publication actions. |
.github/workflows/publish-npm.yml |
Uses exact tags for npm publication actions. |
.github/workflows/move-major-tag.yml |
Uses exact tags for major-tag maintenance actions. |
.github/workflows/engine-quality.yml |
Migrates action tags and composite-action references. |
.github/workflows/copilot-setup-steps.yml |
Uses exact tags for checkout and Node setup. |
.github/workflows/ci.yml |
Adds lockfile verification and migrates action references. |
.github/workflows/actions.lock |
Records workflow dependencies, commits, and repository identities. |
.github/release-build-setup.yml |
Aligns the release download step with exact-tag references. |
.github/actions/verus/action.yml |
Uses an exact cache action tag. |
.github/actions/rust-quality/action.yml |
Uses exact tags for Rust quality tooling actions. |
.github/actions/package/action.yml |
Uses an exact Node setup tag. |
.github/actions/check/action.yml |
Uses exact tags for build and check toolchain actions. |
.github/actions/browser/action.yml |
Uses exact tags for setup and failure-artifact upload. |
.github/actions/action-e2e/action.yml |
Adds comments explaining the retained local action reference. |
.github/actions/action-dependencies/action.yml |
Lists published-action dependencies for CI lockfile coverage. |
.github/actionlint.yaml |
Adds scoped exceptions for self-repository syntax and the never-run step. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adopts the GitHub Actions workflow lockfile (GA 2026-10-28) for every workflow, as an early example for the githubnext org's pinning push.
.github/workflows/actions.lock(generated bygh actions-lock) onboards all 10 workflows and locks every action, including transitive ones reached through our composite actions, to its commit and source repository ID. The runner refuses an action a workflow's lockfile doesn't lock.sha-as-ref("pin to a tag instead") and rewrites SHAs to tags in fix mode. Every SHA was mapped to the exact full semver tag at the same commit (e.g.actions/checkout@d23441a…→@v6.1.0), so no action code changes. Exact tags (notv6) must still point at the locked commit or the lockfile check fails.$/.github/actions/<name>(--migrate-local-actions), so the lockfile can follow them and lock their actions.action.ymlkeeps its full SHAs. The repositories that usegithubnext/projections@v0don't have our lockfile. gh-actions-lock 0.4.1 rewrites them anyway; that's fixed on itsmain(github/gh-actions-lock#298, plus #300 for exact SHA lock keys) but not released yet. The lockfile was generated with a build of itsmain(81b70d1). 0.4.1's--verifyaccepts it.uses: ./for the root action:build-from-sourcebuilds fromGITHUB_ACTION_PATH, and with$/that would be a fresh copy without the job'starget/ornode_modules. Following the docs' "keeping a local path action" pattern, a never-run step (if: false) uses.github/actions/action-dependencies, which lists the root action's actions at the same SHAs soci.ymllocks them. A test keeps the two in step.release.ymlstays exactly whatdist generatewrites. dist formats[dist.github-action-commits]values asname@valuewithout validating them (its own defaults are tags), so those values and.github/release-build-setup.ymlnow hold the same exact tags.dist generateoutput is byte-identical to what gh-actions-lock wrote.release.test.mjsnow requires each release action at an exact tag that the lockfile locks for that workflow, not a SHA.actions-lockjob runsgh actions-lock --verify --ignore-local-actionswith the extension pinned to v0.4.1, on PRs, main and the weekly schedule (so a moved upstream tag is caught).$/steps yet:.github/actionlint.yamlignores only that message forci.yml/engine-quality.yml, plus theif: falseconstant forci.yml.docs/runner/building.mdmentions the new actionlint ignores.Not covered: the
build-local-artifactscontainer image inrelease.ymlis a dist-generated${{ matrix.container… }}expression, which the lockfile can't check (a warning). Dependabot stays security-only. When it bumps an onboarded workflow it also updates the lockfile; a bump torelease.ymlwould still needdist-workspace.tomlupdated to match.Evidence
gh actions-lock --verify --ignore-local-actions(v0.4.1) and themainbuild: all 10 workflows valid; rerunning the generator is a no-op.node tools/scripts/dist.mjs --checkwith dist 0.34.0: passes.node --test packages/cli/test/release.test.mjs7/7. Theaction.ymlpins test ingithub-action/test/action.test.mjspasses; the suite's other tests need a built CLI, which CI provides.actionlint,oxfmt --check,check:links,check:portability,check:boundaries: pass.Documentation that this change affects is updated, and generated reference
pages are regenerated (
npm run docs:generate).Fixes include a regression test.
No credentials, private source or machine-specific paths are included.